package com.ninong.ker.admin.rest.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.activiti.engine.history.HistoricActivityInstance;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.task.Comment;
import org.activiti.engine.task.Task;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author jmz
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class HistoricProcessInstanceVO implements Serializable {

    Date startTime;
    Date endTime;
    String activityName;
    String assignee;
    String comment;

    public HistoricProcessInstanceVO(Comment t, HistoricTaskInstance singleResult) {
        this.comment = t.getFullMessage();
        this.assignee = singleResult.getName();
        this.startTime = singleResult.getCreateTime();
    }
}
